<?php
class PostDao extends BaseDao
{
	public function __construct()
	{
		parent::__construct();
		$this->tg 	= $this->db->getTDG(C('LtConfig')->get('db.table.prefix')."post");
	}
	
	public function addVisitNum($id,$num)
	{
		$expression	= new LtDbSqlExpression('visit_num+('.$num.')');
		return $this->tg->update($id,array('visit_num'=>$expression));
	}
}